Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow cli users to authorize Staker signed by Withdrawer #23146

Merged
merged 1 commit into from
Feb 16, 2022

Conversation

CriesofCarrots
Copy link
Contributor

Problem

The stake program allows either the current stake or withdraw authority to sign for a change to the stake authority, but solana-cli does not, because it does a strict staker-to-staker comparison in pre-tx checks:

check_current_authority(&authorized.staker, &authority.pubkey())?;

Summary of Changes

Check both withdraw and stake current authorities and ensure one of them matches. If neither does, the error message prints the Staker as the expected pubkey

@CriesofCarrots
Copy link
Contributor Author

Hmm, CI failure looks unrelated to this change. I'm seeing it repro on master locally.
Maybe intermittent, related to fee stabilization

@CriesofCarrots
Copy link
Contributor Author

CI issue fixed here: #23160
This should be reviewable

Copy link
Contributor

@t-nelson t-nelson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great!

@CriesofCarrots CriesofCarrots merged commit 88b66ae into solana-labs:master Feb 16, 2022
mergify bot pushed a commit that referenced this pull request Feb 16, 2022
mergify bot pushed a commit that referenced this pull request Feb 16, 2022
mergify bot added a commit that referenced this pull request Feb 16, 2022
CriesofCarrots pushed a commit that referenced this pull request Feb 16, 2022
jeffwashington pushed a commit to jeffwashington/solana that referenced this pull request Feb 16, 2022
@CriesofCarrots CriesofCarrots deleted the cli-stake-auth branch February 26, 2022 21:02
jeffwashington pushed a commit to jeffwashington/solana that referenced this pull request Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants